﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HelloMinasan.Domain;
using HelloMinasan.Domain.Dtos;
using HelloMinasan.UserDefinedType.Dtos;

namespace HelloMinasan.Business.Extend
{
    public interface ISongService : IService<Song>
    {
        //IList<ArticleCommentDto> GetArticleCommentList(int articleId, int languageId);
        TypeSong GetTypeSong(int id);
        IEnumerable<Song> GetSongsByUsername(int userId, int page = 1);
        IEnumerable<Song> GetAllSongs(int page = 1);
        IEnumerable<Song> GetRelativeSong(Song songObj);
        Song GetSongContent(int songId, bool isUpView = false);
        int AddSong(Song songObject);
        void AddLyric(LyricDetail lyricObject);
        void EditLyric(IEnumerable<LyricDetail> lyricObject);
        IEnumerable<LyricDetail> GetLyricBySongId(int songId);
        void EditSong(Song songObject);
        void EditGrammar(Song songObject);
        void EditSongFiles(Song songObject);
        void DeleteSong(int songId);
        void LockSong(int songId, bool isLocked = true);
        void UpdateScore(int userId, int score);
        void CommunityUpdateLyric(LyricDetail lyricDetail, int userId);
        void CommunityUpdateEmbedLink(Song songObject, int userId);
        IEnumerable<Language> GetLanguage(bool isSelectAll, int songId = 0);
        void CommunityAddMoreLyric(LyricDetail lyric);
        void AddTestQuiz(QuestionQuiz model);
        void CommunityGrammar(Song song);
        void AddTestBlank(QuestionBlank model);
        void LikeSong(int userId, int songId);
        IEnumerable<Song> SearchSong(string keyword, int pageNumber, bool isOnlyUnapprove, int userId = 0);
        int SearchSongCount(string keyword, int pageNumber, bool isOnlyUnapprove, int userId = 0);
        void UpdateTestBlank(QuestionBlank model);
        void UpdateTestQuiz(QuestionQuiz model);
        void DeleteTest(int testId, bool type);
        void ApproveLyric(int lyricId, bool typeAction);

        //home migrated
        int TotalSongCount();
        int TotalUserCount();
        int TotalThreadCount();
        IEnumerable<Song> GetTopHighestSongs();
        IEnumerable<QA> GetTopNewestQAs();
        IEnumerable<User> GetTopHighestUsers();
        IEnumerable<Song> GetSearchSongs(string keyword);

        //fovorated song
        void AddFavouriteSong(int songId, int userId);
        void DeleteFavouriteSong(int songId, int userId);
        IEnumerable<FavouriteSong> GetMyFavouriteSongs(int userId, string keyword, out int totalItems, int page = 1);

        //friend
        IEnumerable<Relationship> GetFriendsByUsername(int userId, int page = 1);
        void AddFriend(int userId1, int userId2);
        void DeleteFriends(int userId1, int userId2);

        //relationship
        IEnumerable<Relationship> GetFriends(int userId, out int totalItems, string keyword, int pageNumber = 1);
        void DeleteFriend(int userId1, int userId2);
        //void AddFriend(string username1, string username2);

        //song blank test
        LyricDetail Get_SongLyric(int SongID);
        Song Get_SongSong(int SongID);
        void Save_SongLyric(QuestionBlank question);
        QuestionBlank Get_QuestionBank(int songid);

        //song comment
        IEnumerable<SongComment> GetSongSommentsBySongId(int songId, out int totalPageCount, int page = 1);
        IEnumerable<SongComment> GetAllSongComments(int page = 1);
        SongComment GetCommentContent(int commentId);
        int AddComment(SongComment songObject);
        void DeleteComment(int commentId);
        void UpdateComment(int commentId, string commentContent);

        //song report
        void AddReport(SongReport report);
        void UpdateStatus(SongReport songreport);
        IEnumerable<SongReport> GetAllReport(int page = 1, int number = 10, string ReportType = "1");
        SongReport GetReport(int reportId);
        void DeleteReport(int reportId);
        IEnumerable<SongReport> GetSongReport(int songid, int page = 1, int number = 10);
        IEnumerable<SongReport> GetLyricReport(int songid, int Lyric, int page = 1, int number = 10);
        IEnumerable<SongReport> GetCommentReport(int songid, int commentid, int page = 1, int number = 10);
        IEnumerable<BadWordsFilter> GetBadWord();
        void AddBadWork(BadWordsFilter BadWords);
        int SumReport(string type, int id);
        int SumReportType(string type);
        bool CheckExistBadWord(string BadWord, int lang);

        IEnumerable<UserNote> GetNotes(int userId, out int total, int currentPage);

        //QA
        //khai báo hàm
        IList<QA> QA_TopView();
        IList<QA> QA_Catagory(string para);

        IList<QA> QA_TopNew();
        IList<QA> QA_TopAnsert();
        IList<QA> QA_TopNew5();
        QA FindQaByID(int QaId);

        void CreateQA(QA Qa);
        void UpdateView(QA Qa);
        void UpdateThanks(QA Qa);
        void CreateComany(QAComment Qacom);
        string SreachUserName(int ID);
    }
}
